using System;
using System.ComponentModel;
using System.Data;
using System.Runtime.Serialization;

namespace MinCultura.Sipa.DataAccess.EntidadesArtes
{
	/// <summary>
	/// A custom serializable dataset containing 
	/// </summary>
	[Serializable()]
	[DesignerCategory("code")]


	/// <summary>Class for handling datasets</summary>  
		public class PoblacionData : DataSet
	{
		///
		/// Constants for table and fields mapping
		///
		public const string ART_POBLACION_TABLE = "ART_POBLACION";

		public const string POB_ID_FIELD = "POB_ID";
		public const string POB_NOMBRE_FIELD = "POB_NOMBRE";


		protected PoblacionData(SerializationInfo info, StreamingContext context)
		{
			//
		}

		public PoblacionData()
		{
			BuildDataTables();
		}

		/// <summary>
		/// Creates the following datatables: Localidades
		/// </summary>
		private void BuildDataTables()
		{
			DataTable table;
			DataColumnCollection columns;
			table = new DataTable(ART_POBLACION_TABLE);
			columns = table.Columns;

			columns.Add(POB_ID_FIELD, typeof (Int16));
			columns.Add(POB_NOMBRE_FIELD, typeof (String));
			this.Tables.Add(table);
		}

		/// <summary>
		/// Add a new row to the table
		/// </summary>
		/// <param name="row">Dataset row
		public void addPoblacion(DataRow row)
		{
			this.Tables[ART_POBLACION_TABLE].Rows.Add(row);
		}

	}

}